// const { default: gql } = require('@apollo/server')
export default  `#graphql
  type Reservation {
    id: ID!
    arrivalDate: String!
    arrivalTime: String!
    tableSize: String!
    name: String!
    phone: String!
    status: Int!
    createdAt: String!
  }
  input ReservationInput {
    arrivalDate: String!
    arrivalTime: String!
    tableSize: String!
  }
  type Query {
    getReservation(phone: String): [Reservation]
  }

  type User {
    id: ID!
    username: String!
    phone: String!
    token: String!
    type: String!
    name: String!
  }
  input RegisterInput {
    username: String!
    phone: String!
    name: String!
    password: String!
    type: String!
    confirmPassword: String
  }

  type Mutation {
    register(registerInput: RegisterInput): User!
    login(username: String!, password: String!): User!
    createReservation(reservationInput: ReservationInput!): Reservation!
    updateReservation(reservationId: ID!, status:Int!): Reservation!
    deleteReservation(reservationId: ID!): Reservation!
  }
`
